import { S } from '../../s';
import { IPSAppDEACModeDataItem } from '../../app/dataentity/ipsapp-deacmode-data-item';
import { IPSAppDEField } from '../../app/dataentity/ipsapp-defield';
import { PSDataItemImpl } from '../../data/psdata-item-impl';
import { IPSDEACModeDataItem } from './ipsdeacmode-data-item';

export class PSDEACModeDataItemImpl
  extends PSDataItemImpl
  implements IPSDEACModeDataItem, IPSAppDEACModeDataItem
{
  get format(): string {
    return this.M.format;
  }

  protected psappdefield: IPSAppDEField;
  getPSAppDEField(): IPSAppDEField | null {
    return (
      this.psappdefield ||
      (this.psappdefield = this.fillObjectModel(
        S._1,
        this.M.getPSAppDEField,
        S._2e4,
      ) as IPSAppDEField)
    );
  }

  get scriptCode(): string {
    return this.M.scriptCode;
  }

  get customCode(): boolean {
    return this.M.customCode != null ? this.M.customCode : false;
  }
  get cls(): string {
    return 'PSDEACModeDataItemImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._294 || cls == S._295) return true;
    return super.instanceof(cls);
  }
}
